<style>
#main-menu {padding:0 0;}
#main-menu li {list-style:none;margin:0 0;}
#main-menu li a{display:block;margin-top:5px;height:135px;border:0 none;color:#FFF;}
#main-menu li a i{font-size:5em;}
#main-menu li a img{height:5em;}
#main-menu li a p{line-height:2em;margin:0 0;}
#main-menu li:nth-child(6n+1) a{ background-color:#caa703}
#main-menu li:nth-child(6n+2) a{ background-color:#079ae8}
#main-menu li:nth-child(6n+3) a{ background-color:#8fb210}
#main-menu li:nth-child(6n+4) a{ background-color:#019cba}
#main-menu li:nth-child(6n+5) a{ background-color:#44b549}
#main-menu li:nth-child(6n+6) a{ background-color:#5359bb}
</style>
	<ul class="row" id="main-menu">
	<portlet model="WxMenu" portlet="body" recursive="1" order="left asc" list_tpl="inner" limit="12" info="conditions[visible]=1">
		<li class="col-md-4 col-xs-6">
		<?php  if($item['link']){$link=$item['link'];}else{$link = '/wx_menus/view/'.$item['wx_id'].'/'.$item['slug'];} ?>
		<a class="btn" href="{{$this->Html->url($link)}}">
			{{if $item['coverimg']}}
				<img src="{{$this->Html->image($item['coverimg'],array('onlyurl'=>true))}}">
				<p>{{$item['name']}}</p>
			{{elseif $item['prefix_icon'] }}
				<i class="{{$item['prefix_icon']}}"></i>
				<p>{{$item['name']}}</p>
			{{else}}
				<p style="line-height:135px;">{{$item['name']}}</p>
			{{/if}}					
		</a>
		</li>
	</portlet>
	</ul>